package com.cr.common.core.domain.entity;

import com.cr.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 小程序用户信息
 */
public class AppUser implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private String userId;

    /** 手机号 */
    private String phone;

    /** 密码 */
    private String password;

    /** 昵称 */
    private String nickName;

    /** 主体名称 */
    private String businessEntity;

    /** 头像图片 */
    private String profileUrl;

    /** 注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date regTime;

    /** 认证状态（0-未认证，1-已认证，2-审核中，3-审核失败） */
    @Excel(name = "认证状态", readConverterExp = "0=未认证,1=已认证,2=审核中,3=审核失败")
    private String authStatus;

    /** 用户状态（1-启用，2-禁用） */
    @Excel(name = "用户状态", readConverterExp = "1=启用,2=禁用")
    private String status;

    /** 认证日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date authTime;

    /** 删除标识（0-正常，1-删除） */
    private String delFlag;

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setNickName(String nickName) 
    {
        this.nickName = nickName;
    }

    public String getNickName() 
    {
        return nickName;
    }

    public void setProfileUrl(String profileUrl) 
    {
        this.profileUrl = profileUrl;
    }

    public String getProfileUrl() 
    {
        return profileUrl;
    }

    public void setRegTime(Date regTime) 
    {
        this.regTime = regTime;
    }

    public Date getRegTime() 
    {
        return regTime;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setAuthStatus(String authStatus) 
    {
        this.authStatus = authStatus;
    }

    public String getAuthStatus() 
    {
        return authStatus;
    }

    public void setBusinessEntity(String businessEntity)
    {
        this.businessEntity = businessEntity;
    }

    public String getBusinessEntity() 
    {
        return businessEntity;
    }

    public void setAuthTime(Date authTime) 
    {
        this.authTime = authTime;
    }

    public Date getAuthTime() 
    {
        return authTime;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("phone", getPhone())
            .append("password", getPassword())
            .append("nickName", getNickName())
            .append("profileUrl", getProfileUrl())
            .append("regTime", getRegTime())
            .append("status", getStatus())
            .append("authStatus", getAuthStatus())
            .append("businessEntity", getBusinessEntity())
            .append("authTime", getAuthTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
